Debian 9 Stretch
Sponsored Link

WebDAV Settings
2017/06/27
 
This is the example to configure WebDAV with SSL connection.
[1] For example, Create a directory [webdav] and it makes possible to connect to WebDAV directory only by SSL.
root@www:~#
apt -y install apache2-utils
root@www:~#
mkdir /home/webdav

root@www:~#
chown www-data. /home/webdav

root@www:~#
chmod 770 /home/webdav

root@www:~#
vi /etc/apache2/sites-available/webdav.conf
Alias /webdav /home/webdav
<Location /webdav>
    DAV On
    SSLRequireSSL
    Options None
    AuthType Basic
    AuthName WebDAV
    AuthUserFile /etc/apache2/.htpasswd
    Require valid-user
</Location> 

root@www:~#
a2enmod dav*

Enabling module dav.
Considering dependency dav for dav_fs:
Module dav already enabled
Enabling module dav_fs.
Enabling module dav_lock.
To activate the new configuration, you need to run:
  service apache2 restart
root@www:~#
a2ensite webdav

Enabling site webdav.
To activate the new configuration, you need to run:
  service apache2 reload

root@www:~#
systemctl restart apache2
# add a user : create a new file with "-c" ( add the "-c" option only for the initial registration )

root@www:~#
htpasswd -c /etc/apache2/.htpasswd debian

New password:    
# set password

Re-type new password:
Adding password for user debian
[2]
It's the settings for WebDAV client on PC (Windows 10).
[3] Download "CarotDAV" which is a free WebDAV Client from following site.
⇒ http://www.rei.to/carotdav_en.html
After downloading, Install and start CarotDAV, then the following screen is shown, Click [File] button and select [WebDAV].
[4] Input any name in [Setting Name] field and input [server name/webdav directory] in [URI] field and input user name and password like follows.
[5] The configuration is added like follows, click it to connect to the server.
[6] The waring is shown like follows because certificates is self-signed and it's not trusted, it's no ploblem if it is your own created one, Click [Ignore] and go next.
[7] Just accessed.
 
Tweet